library(tidyverse)

df <- read_csv("../data/google_trends_clinton_trump.csv", skip = 2)
colnames(df) <- c("Date", "Hillary Clinton", "Donald Trump")

df <- df %>% pivot_longer(-Date, names_to = "Term",
  values_to = "Interest")

p <- df %>% ggplot(aes(Date, Interest, color = Term)) +
  geom_line(lwd = 1) +
  theme_classic() +
  scale_colour_grey() +
  ggtitle("Google Trends: Sep. 1 - Nov. 6, 2016")
ggsave("../results/figures/google_trends_clinton_trump.pdf", device = "pdf", width = 8, height = 4)